package view;

import javax.swing.JCheckBox;

import model.User;

/**
 * Special inner class that just improves upon the 
 * JCheckbox. It customizes it with a field
 * that can be retrieved and modified easilly.
 * 
 * @author Tristan D. Boucher
 * @version Commit #22 9/14/2013
 */
@SuppressWarnings("serial")
final class UserBox extends JCheckBox
{
  /**
   * The class that will create this checkbox.
   */
  private final User my_user;

  /**
   * Constructor.
   * 
   * @param the_user The user used to construct this checkbox.
   */
  public UserBox(final User the_user)
  {
    super(the_user.toString());
    my_user = the_user;
  }

  /**
   * Accessor for my_user.
   * 
   * @return my_user
   */
  public User getUser()
  {
    return my_user;
  }
}

